<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Recommendations<%= " - " + @page_title unless @page_title.nil? %></title>
  <%= stylesheet_link_tag 'default' %>
  <%= stylesheet_link_tag 'iphone', :media => "only screen and (max-device-width: 480px)" %>
  <meta name = "viewport" content = "initial-scale = 1.0"></meta>
	<%= auto_discovery_link_tag(:atom, "/recommendations.atom", :title => "Web feed") %>
	<%= meta_tag("keywords", @recommendation.tags_csv) if @recommendation && @recommendation.tags_csv %>
</head>
<body>
	<div id="page">
		<p class="skip_navigation"><%= link_to_content("Skip navigation")%></p>
		<div id="header">
			<div class="site_identity">
				<p class="site_name"><%= link_to_homepage("Recommendations")%></p>
				<% #<p class="site_strapline"></p> %>
			</div>	

			<%- form_tag recommendations_path, :method => 'get' do -%>
			  <p class="search">
			    <%= text_field_tag :search, @search_string %>
			    <%= submit_tag "Search", :name => nil %>
			  </p>
			<%- end -%>

			<% if logged_in? %>
			<p>You are logged in as <%= user_link current_user %> (<%= link_to "edit profile", edit_user_path(current_user.username)%>). <%= link_to "logout", logout_path, {:class => "logout"}%> </p>
			<% else %>
			<p><%= link_to "login", login_path%> or <%= link_to "register", register_path%></p>
			<% end %>
			

		</div>
		
		<div id="body">
			<%= content_tag("div", flash[:notice], {:id => "notice"}) if flash[:notice]%>
			
			<%= yield %>			

		</div>
	
		<div id="footer">
	</div>
	
	</div>
	<%= if ENV['RAILS_ENV'] == 'production'
	 end %>
</body>
</html>
